import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SFightRecord } from "../BroadCast/SFightRecord";
import { SWrestleFightRecordPlayerInfo } from "./SWrestleFightRecordPlayerInfo";
type int = number;
//class SWrestleSaveFightRecord
    
    export  class SWrestleSaveFightRecord extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SWrestleSaveFightRecord();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.record.__write(arg1);
            this.winPlayer.__write(arg1);
            this.losePlayer.__write(arg1);
            arg1.writeDate(this.createDt);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.record = new SFightRecord();
            this.record.__read(arg1);
            this.winPlayer = new SWrestleFightRecordPlayerInfo();
            this.winPlayer.__read(arg1);
            this.losePlayer = new SWrestleFightRecordPlayerInfo();
            this.losePlayer.__read(arg1);
            this.createDt = arg1.readDate();
            return;
        }

        public /* const */_type: int=617;

        public /* var */record: SFightRecord;

        public /* var */winPlayer: SWrestleFightRecordPlayerInfo;

        public /* var */losePlayer: SWrestleFightRecordPlayerInfo;

        public /* var */createDt: Date;

        public static /* var */_regist: SWrestleSaveFightRecord;
    }

            SWrestleSaveFightRecord._regist = new SWrestleSaveFightRecord(true);
        